from aiohttp import web

routes = web.RouteTableDef()

@routes.get("/")
async def hello(request):
    return web.Response(text="Hello, world")


def server():
    app = web.Application()
    # app.add_routes([web.get('/', hello)])
    app.add_routes(routes)
    web.run_app(app, host="127.0.0.1", port=8009)

server()